feat(sidebar): add ⌘B shortcut to collapse/expand sidebar#5047
feat(sidebar): add ⌘B shortcut to collapse/expand sidebar#5047waleedlatif1 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@cursor review |
PR SummaryLow Risk Overview Introduces
Reviewed by Cursor Bugbot for commit 97d8c98. Configure here. |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 64d4dd0. Configure here.
Greptile SummaryThis PR adds a
Confidence Score: 5/5Safe to merge — the shortcut is correctly scoped to non-editable contexts, tooltips derive from a single source of truth, and both the collapse and expand affordances surface the hint. The three previously flagged concerns are all resolved in this revision. isMacPlatform() is SSR-safe, formatCommandShortcut is pure and correct for multi-token shortcut strings, and the Tooltip wrapper in WorkspaceHeader degrades cleanly when expandShortcut is omitted. No new logic errors or regressions introduced. No files require special attention. Important Files Changed
Reviews (5): Last reviewed commit: "improvement(sidebar): address review — s..." | Re-trigger Greptile |
Greptile SummaryThis PR registers
Confidence Score: 4/5Safe to merge; the changes are small and self-contained, with no effect on data or auth. The main practical risk is The implementation is clean and consistent with how other global shortcuts are wired. The
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant GlobalCommandsProvider
participant Sidebar
User->>GlobalCommandsProvider: keydown ⌘B / Ctrl+B (capture phase)
GlobalCommandsProvider->>GlobalCommandsProvider: matchesShortcut("collapse-sidebar")
GlobalCommandsProvider->>GlobalCommandsProvider: e.preventDefault() + e.stopPropagation()
GlobalCommandsProvider->>Sidebar: handler() → toggleCollapsed()
Sidebar->>Sidebar: isCollapsed state flipped
Note over User,Sidebar: Tooltip path (sidebar expanded)
User->>Sidebar: hover collapse button
Sidebar->>User: SidebarTooltip shows "Collapse sidebar ⌘B"
Reviews (2): Last reviewed commit: "feat(sidebar): add ⌘B shortcut to collap..." | Re-trigger Greptile |
…d hint, expand tooltip
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 97d8c98. Configure here.
|
@greptile review |

Summary
⌘B(Ctrl+B on Windows) global shortcut to collapse/expand the workspace sidebarcollapse-sidebar,Mod+B)Tooltip.Shortcut, platform-aware (⌘ vs Ctrl)Type of Change
Testing
Tested manually — ⌘B toggles the sidebar from anywhere in the workspace; tooltip shows the shortcut.
Checklist